package com.cjj.mybatis.object;

import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @Date 2021/11/03 11:54:56
 * @Created by BrownC_
 * @email ccc-ju@outlook.com
 */
public interface ISuperService<T> extends IService<T> {

    /**
     * replace into
     */
    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
    boolean replaceInto(T entity);

    /**
     * replace into by map
     */
    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
    boolean replaceIntoByMap(Map<String, Object> columnMap);
}
